package com.globallogic.jbtask4;

public enum Day {

    SUNDAY("Sunday"),
    MONDAY("Monday"),
    TUESDAY("Tuesday"),
    WEDNESDAY("Wednesday"),
    THURSDAY("Thursday"),
    FRIDAY("Friday"),
    SATURDAY("Saturday");

    private String dayName;   
 
    Day(String dayName) {

        this.dayName = dayName;   

    }    

    @Override
    public String toString(){
    
        return dayName;

    }

    public static String getDayName(int dayNumber) {
       
        return Day.values()[dayNumber].toString();    

    }
}
